import http from "../utils/http/service";

// 创建车辆出入
export const addAccess = (data): any => {
  return http.post(`/snow-admin/thdVehicleAccess/add`, data);
};

// 创建车辆出入
export const accessList = (data): any => {
  return http.post(`/snow-admin/thdVehicleAccess/findList`, data);
};

// 删除记录
export const delAccess = (id): any => {
  return http.post(`/snow-admin/thdVehicleAccess/delete/${id}`);
};

// 详情
export const getAccessInfo = ({ id }): any => {
  return http.post(`/snow-admin/thdVehicleAccess/detail/${id}`);
};

// 修改
export const editAccess = (params): any => {
  return http.post(`/snow-admin/thdVehicleAccess/update`, params);
};

// 审批详情信息
export const getAccessFlowInfo = ({ id }): any => {
  return http.get(`/snow-admin/thdVehicleAccess/flowInfo/${id}`);
};

// 提交审批
export const approvalAccess = (params): any => {
  return http.post(`/snow-admin/thdVehicleAccess/flowSubmit`, params);
}

// 驳回
export const rejectAccess = (params): any => {
  return http.post(`/snow-admin/thdVehicleAccess/flowReject`, params);
}
